home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
progjour
/
1991
/
06
/
alib
/
putchar.asm
< prev
next >
Wrap
Assembly Source File
|
1991-08-21
|
354b
|
29 lines
include asm.inc
public putchar
.code
;; putchar
;
; entry AL character
;
putchar proc
pushm ax,dx
mov ah,2
cmp al,LF_CHAR ; treat line feed character as newline
je pch2 ; if line feed
mov dl,al
pch1: int 21h
popm dx,ax
ret
pch2: mov ah,2
mov dl,CR_CHAR
int 21h
mov dl,LF_CHAR
jmp pch1
putchar endp
end